﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Web.Mvc.Html.jTable
{
    public enum Result
    {
        OK,
        ERROR
    }

    public class jTableListResponse
    {
        public Result ResultCode { get; set; }
        public String Result
        {
            get
            {
                return ResultCode.ToString();
            }
        }
        public Object Records { get; set; }
    }

    public class jTablePagedListResponse
    {
        public Result ResultCode { get; set; }
        public String Result
        {
            get
            {
                return ResultCode.ToString();
            }
        }
        public Object Records { get; set; }
        public Int32 TotalRecordCount { get; set; }
    }

    public class jTableCreateResponse
    {
        public Result ResultCode { get; set; }
        public String Result
        {
            get
            {
                return ResultCode.ToString();
            }
        }
        public Object Record { get; set; }
    }

    public class jTableUpdateResponse
    {
        public Result ResultCode { get; set; }
        public String Result
        {
            get
            {
                return ResultCode.ToString();
            }
        }
    }

    public class jTableDeleteResponse
    {
        public Result ResultCode { get; set; }
        public String Result
        {
            get
            {
                return ResultCode.ToString();
            }
        }
    }

    public class jTableErrorResponse
    {
        public Result ResultCode { get; set; }
        public String Result
        {
            get
            {
                return ResultCode.ToString();
            }
        }
        public String Message { get; set; }
    }
}
